<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAddrTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('addr', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('uid') -> comment('用户ID');
            $table->string('rec') -> comment('收货人');
            $table->string('addr') -> comment('收货地址');
            $table->string('tel') -> comment('联系电话');
            $table->smallInteger('status') ->default(0) -> comment('状态,0非默认,1默认地址');
            $table->timestamps();
            });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
         Schema::drop('addr');
    }
}
